
//
//  CommentCell.m
//  WGFGlobalHouses
//
//  Created by Andy on 15/7/14.
//  Copyright (c) 2015年 waiguofang. All rights reserved.
//

#import "CommentCell.h"
#import "config.h"


@interface CommentCell ()

@property (weak, nonatomic) IBOutlet UIButton *headImgView;
@property (weak, nonatomic) IBOutlet UILabel *nickLab;
@property (weak, nonatomic) IBOutlet UILabel *commentLab;

@end


@implementation CommentCell



+(instancetype) cellWithTableView:(UITableView *)tableview{

    static NSString *ID = @"CommentCell";
    CommentCell *cell = [tableview dequeueReusableCellWithIdentifier:ID];
    if (cell == nil)
    {
        cell = [[[NSBundle mainBundle]loadNibNamed:@"CommentCell" owner:nil options:nil]lastObject];
        
        [cell setSelectionStyle:UITableViewCellSelectionStyleNone];

        cell.commentLab.preferredMaxLayoutWidth = PMW-14-25-18;
        [cell.commentLab layoutIfNeeded];
    }
    
    return cell;
}


+(CGFloat)getHight:(CellBaseData*)data withTableView:(UITableView*)tableView{
    
    
    static CommentCell *cell = nil;
    
    static dispatch_once_t predicate;
    dispatch_once(&predicate, ^{
        
         cell = [CommentCell cellWithTableView:tableView];
    });
    
    [cell setData:data];
    
    CGFloat height = [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height;
    
    return  height+1;
}



-(void)setData:(CellBaseData*)data{

    
    
}



@end
